]> dgit.raspbian.org Git - gnome-shell.git/commit
quickSettings: Update bind constraint offset on idle
authorJonas Ådahl <jadahl@gmail.com>
Wed, 7 Sep 2022 21:17:22 +0000 (23:17 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sat, 17 Sep 2022 18:09:57 +0000 (18:09 +0000)
commitc080bc59a4eac57756e3b1d92e33b88fc5b530c7
tree6337769bfd73ab9f851dfbcff8a6b2419728c247
parent990eb92bd91b08b6943ba969b0e00a4a98f75fbf
quickSettings: Update bind constraint offset on idle

Use Meta.LaterType.BEFORE_REDRAW to queue setting the bind constraint
offset in an idle callback. This is needed since the signals that
trigger updating the offset may be emitted during allocation, at which
point queuing new relayouts isn't ideal, since it could result in
relayout cycles. In this case, we really do want to relayout as a side
effect of another actors allocation, so make this explicit.

This fixes a few warnings such as:

The actor '<unnamed>[<StBoxLayout>:0x3138d70]' is currently inside an
allocation cycle; calling clutter_actor_queue_relayout() is not recommended

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2476>
js/ui/quickSettings.js